package com.ibm.mall.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibm.mall.dao.AppraisalDao;
import com.ibm.mall.model.Appraisal;
import com.ibm.mall.model.Commodity;
import com.ibm.mall.service.AppraisalService;

@Service
@Transactional
public class AppraisalServiceImpl implements AppraisalService {
	
	@Resource
	private AppraisalDao appraisalDao;

	@Override
	public List<Appraisal> getAllAppraisalByCommodityId(Commodity commodity) {
		return appraisalDao.getAllAppraisalByCommodityId(commodity);
	}

	@Override
	public void saveAppraisal(Appraisal appraisal) {
		appraisalDao.save(appraisal);
	}

}
